package com.whli.jee.common.web.service;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>基本的登录验证</p>
 * @author whli
 * @version 1.0.0
 * @date 2019/6/23 9:45
 */
public interface IBaseAuthenticationService {

    /**
     * 登录
     * @param request
     * @return
     */
    public Map<String,Object> login(HttpServletRequest request);

    /**
     * 退出登录
     * @return
     */
    public boolean logout(HttpServletRequest request);

    /**
     * 获取token
     * @return
     */
    public String getToken();


    /**
     * 获取登录用户名
     * @return
     */
    public String getLoginUserName();


    /**
     * 获取登录用户ID
     * @return
     */
    public String getLoginUserId();


    /**
     * 判断登录用户的token
     * @param token
     * @return
     */
    public boolean existsToken(String token);
}
